<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<table border="1">
    <caption>个人信息列表</caption>
    <tr>
        <td>姓名</td>
        <td>{{person.name}}</td>
    </tr>
    <tr>
        <td>照片</td>
        <td><img :src="person.url" alt=""></td>
    </tr>
    <tr>
        <td>年龄</td>
        <td>{{person.age}}</td>
    </tr>
    <tr>
        <td>好友</td>
        <td>
        <ul>
            <li v-for="name in person.friend">{{name}}</li>
        </ul>
        </td>
    </tr>
    <tr>
        <td>工作</td>
        <td>{{person.job}}</td>
    </tr>
    <tr>
        <td colspan="2" align="center">
            <input type="button" @click="f()" value="输入数据">
        </td>
    </tr>
</table>
<!--引入vue-->
<script src="https://lf3-cdn-tos.bytecdntp.com/cdn/expire-1-M/vue/2.6.14/vue.js"></script>
<script>
    let v = new Vue({
        el:"table",
        data:{
            person:{}
        },
        methods:{
            f:function () {
                v.person={
                    name:"刘德华",
                        age:21,
                        url:"2.jpg",
                        job:"程序员",
                        friend:["郭富城","张学友","赵四"]
                }
            }
        }
    })
</script>
</body>
</html>